package network;

public class JoinGameMsg extends NetworkMsg {

	private static final long serialVersionUID = 1L;

	private int gameID;
	private String name;
	
	public JoinGameMsg(int gameID, String name){
		super(Type.JoinGame);
		this.setGameID(gameID);
		this.setName(name);
	}

	/**
	 * @param gameID the gameID to set
	 */
	public void setGameID(int gameID) {
		this.gameID = gameID;
	}

	/**
	 * @return the gameID
	 */
	public int getGameID() {
		return gameID;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * use only in JoinGame
	 * @return the game index
	 */
	public int getGameIndex(){
		return this.gameID;
	}
}
